﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="newsShow.aspx.cs" Inherits="news" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataSourceID="SqlDataSourceNews" EnableModelValidation="True" 
    Width="497px">
    <Columns>
        <asp:BoundField DataField="newsID" HeaderText="编号" 
            SortExpression="newsID" />
        <asp:HyperLinkField DataNavigateUrlFields="newsID" 
            DataNavigateUrlFormatString="newsView.aspx?newsID={0}" 
            DataTextField="newsTitle" HeaderText="标题" />
        <asp:BoundField DataField="c_Name" HeaderText="作者" 
            SortExpression="c_Name" />
        <asp:BoundField DataField="newsTime" HeaderText="发布时间" 
            SortExpression="newsTime" />
    </Columns>
    <EmptyDataTemplate>
        该分类无文章
    </EmptyDataTemplate>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSourceNews" runat="server" 
    ConnectionString="<%$ ConnectionStrings:qynbControlSystemConnectionString %>" 
    
    SelectCommand="SELECT news.newsID, news.newsTitle, cusInfo.c_Name, news.newsAuthor, news.newsClass, news.newsRemark, news.newsTime FROM news INNER JOIN cusInfo ON cusInfo.cusID = news.newsAuthor WHERE (news.newsClass = @Param1)">
    <SelectParameters>
        <asp:QueryStringParameter Name="Param1" QueryStringField="cID" />
    </SelectParameters>
</asp:SqlDataSource>
</asp:Content>

